from django.urls import (
    path, re_path, include
)
from django.views.static import serve
from django.conf import settings

# xadmin配置
# import xadmin
# from xadmin.plugins import xversion  # version模块自动注册需要版本控制的 Model
# xversion.register_models()
# xadmin.autodiscover()


import xadmin
xadmin.autodiscover()
# xversion模块自动注册需要版本控制的 Model
from xadmin.plugins import xversion
xversion.register_models()

urlpatterns = [
    path('xadmin/', xadmin.site.urls),

    path('home/', include('home.urls')),

    # media路由配置
    re_path('^media/(?P<path>.*)', serve, {'document_root': settings.MEDIA_ROOT})
]
